var type = require('./mutation-types');

// 设置当前在线用户
exports[type.SET_ONLINE_USER] = function (state, user) {
  state.user.userId = user.userId;
  state.user.userName = user.userName;
  state.user.token = user.token;
  state.user.source = user.source;
  state.user.userType = user.userType; 
  state.user.curUser=user.curUser;
  state.user.curMenuRole = user.curMenuRole;
  state.user.showMenu = user.showMenu;
};

exports[type.SET_AREA] = function (state, area) {
  state.area = area;
};
exports[type.SET_TITLE]=function(state,title){
  state.title=title;
}
exports[type.SETAGAINLOGIN]=function(state,bool){
   state.options.againlogin=bool;
}